package com.bsoft.gol.editor.dao;

import ctd.persistence.annotation.DAOMethod;
import ctd.persistence.annotation.DAOParam;
import com.bsoft.gol.editor.editor.EditorQuestionnaireOfficial;

import java.util.List;

/**
 * @program: Myproject
 * @description:
 * @author: zangsf
 * @create: 2022-12-08 15:30
 **/
public abstract class EditorQuestionnaireOfficialDAO extends ctd.persistence.support.hibernate.HibernateSupportDelegateDAO<EditorQuestionnaireOfficial> {
    public EditorQuestionnaireOfficialDAO() {
            this.setKeyField("officialId");
    }

    @DAOMethod(sql = " from  EditorQuestionnaireOfficial where questionnaireId=:questionnaireId  order by createTime desc")
    public abstract List<EditorQuestionnaireOfficial> queryEditorQuestionnaireOfficialList(@DAOParam("questionnaireId") String questionnaireId);

    @DAOMethod(sql = " delete from  EditorQuestionnaireOfficial where questionnaireId=:questionnaireId  and processMode !=:processMode ")
    public abstract void removeEditorQuestionnaireOfficial(@DAOParam("questionnaireId") String questionnaireId,@DAOParam("processMode") String processMode);
}
